package br.inf.solutions.apresentacoes.ssp.model.basics;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import br.com.vexillum.model.annotations.SearchField;
import br.com.vexillum.model.annotations.Validate;
import br.com.vexillum.model.annotations.ValidatorClass;

@Entity
@SuppressWarnings("serial")
@ValidatorClass(validatorClass="br.inf.solutions.apresentacoes.ssp.control.validator.ModelValidator")
public class Model extends BasicCommon {
 
	@SearchField
	@Validate(notNull=true)
	@ManyToOne(optional = true, fetch = FetchType.LAZY)
	@JoinColumn(name = "mark_id", insertable = true, updatable = true, nullable=false)
	private Mark mark;
	
	public Mark getMark() {
		return mark;
	}

	public void setMark(Mark mark) {
		this.mark = mark;
	}
}
 
